From c8d9819c9a54eb4854157bd1eb0f9c540621b2b4 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 4 Mar 2021 16:41:20 -1000 Subject: [PATCH] themes: warn if booted from initramfs Some devices offer a full LuCI interface from their recovery interface. As it's read-only it should only be used for installing sysupgrades and therefore warn users that no settings are saved. Signed-off-by: Paul Spooren --- .../luasrc/view/themes/bootstrap/header.htm | 10 ++++++++++ .../luasrc/view/themes/material/header.htm | 10 ++++++++++ .../luasrc/view/themes/openwrt2020/header.htm | 10 ++++++++++ .../luasrc/view/themes/openwrt.org/header.htm | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm index 81a23d63af..d762637d8a 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -59,6 +59,16 @@ <%- end -%> + <%- if boardinfo.rootfs_type == "initramfs" then -%> +
+

<%:System running in recovery (initramfs) mode.%>

+

<%:No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade%>

+ <% if disp.lookup("admin/system/flash") then %> + + <% end %> +
+ <%- end -%> +